package com.xbongbong.paas.service.workflow.setting;

import com.xbongbong.paas.pojo.workflow.nodes.dto.WorkflowNodeBackDTO;
import com.xbongbong.paas.pojo.workflow.nodes.dto.WorkflowNodeCopyDTO;
import com.xbongbong.paas.pojo.workflow.nodes.dto.WorkflowNodeDeleteDTO;
import com.xbongbong.paas.pojo.workflow.nodes.dto.WorkflowNodeGetDTO;
import com.xbongbong.paas.pojo.workflow.nodes.dto.WorkflowNodeListDTO;
import com.xbongbong.paas.pojo.workflow.nodes.dto.WorkflowNodeSortDTO;
import com.xbongbong.paas.pojo.workflow.nodes.dto.WorkflowNodeSourceListDTO;
import com.xbongbong.paas.pojo.workflow.nodes.dto.WorkflowNodeUpdateDTO;
import com.xbongbong.paas.pojo.workflow.nodes.dto.WorkflowNodeViewDetailDTO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeBackVO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeCopyVO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeDeleteVO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeGetVO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeListVO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeSaveVO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeSortVO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeSourceListVO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeUpdateVO;
import com.xbongbong.paas.pojo.workflow.nodes.vo.WorkflowNodeViewDetailVO;
import com.xbongbong.paas.pojo.workflow.settings.dto.WorkflowNodeSaveDTO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import com.xbongbong.workflow.domain.entity.WorkflowNodeEntity;
import com.xbongbong.workflow.pojo.nodes.WorkflowNodePojo;

import java.util.List;

/**
 * @author 吴峰
 * @date 2021/05/10 10:24
 */
public interface WorkflowNodeService {


    /**
     * 保存节点
     * @param workflowNodeSaveDTO
     * @return com.xbongbong.workflow.pojo.nodes.vo.WorkflowNodeSaveVO
     * @author 吴峰
     * @date 2021/5/12 9:41
     * @throws XbbException
     */
    WorkflowNodeSaveVO save(WorkflowNodeSaveDTO workflowNodeSaveDTO) throws XbbException;


    /**
     * 创建工作流节点
     * @param corpid
     * @param type
     * @param workflowId
     * @param workflowNodePojo
     * @param userVO
     * @param httpHeader
     * @param move
     * @return
     * @throws XbbException
     */
    List<WorkflowNodeEntity> addWorkflowNode(String corpid, Integer type, Long workflowId, WorkflowNodePojo workflowNodePojo, UserVO userVO, String httpHeader, Integer move) throws XbbException;

    /**
     * 删除节点
     * @param workflowNodeDeleteDTO
     * @return
     * @throws XbbException
     */
    WorkflowNodeDeleteVO delete(WorkflowNodeDeleteDTO workflowNodeDeleteDTO) throws XbbException;
    /**
     * 节点list
     * @param workflowNodeListDTO
     * @return
     * @throws XbbException
     */
    WorkflowNodeListVO list(WorkflowNodeListDTO workflowNodeListDTO) throws XbbException;

    /**
     * 获取节点详情
     * @param workflowNodeGetDTO
     * @return com.xbongbong.workflow.pojo.nodes.vo.WorkflowNodeGetVO
     * @author 吴峰
     * @date 2021/5/25 9:29
     * @throws XbbException
     */
    WorkflowNodeGetVO get(WorkflowNodeGetDTO workflowNodeGetDTO) throws XbbException;

    /**
     * 【web】条件节点调整优先级
     * @param workflowNodeSortDTO
     * @return com.xbongbong.workflow.pojo.nodes.vo.WorkflowNodeSortVO
     * @author 吴峰
     * @date 2021/5/25 9:29
     * @throws XbbException
     */
    WorkflowNodeSortVO sort(WorkflowNodeSortDTO workflowNodeSortDTO) throws XbbException;


    /**
     * 【web】数据源
     * @param workflowNodeSourceListDTO
     * @return com.xbongbong.workflow.pojo.nodes.vo.WorkflowNodeSortVO
     * @author 吴峰
     * @date 2021/5/25 9:29
     * @throws XbbException
     */
    WorkflowNodeSourceListVO sourceNodeList(WorkflowNodeSourceListDTO workflowNodeSourceListDTO) throws XbbException;

    /**
     * 【web】更新备注
     * @param workflowNodeUpdateDTO
     * @return com.xbongbong.workflow.pojo.nodes.vo.WorkflowNodeUpdateVO
     * @author 吴峰
     * @date 2021/5/25 9:29
     * @throws XbbException
     */
    WorkflowNodeUpdateVO update(WorkflowNodeUpdateDTO workflowNodeUpdateDTO) throws XbbException;

    /**
     * 回退校验
     * @param workflowNodeBackDTO
     * @return
     * @throws XbbException
     */
    WorkflowNodeBackVO back(WorkflowNodeBackDTO workflowNodeBackDTO) throws XbbException;

    /**
     * 复制节点
     * @param workflowNodeCopyDTO
     * @return
     * @throws XbbException
     */
    WorkflowNodeCopyVO copy(WorkflowNodeCopyDTO workflowNodeCopyDTO) throws XbbException;

    /**
     * 消息节点，穿透详情
     * @param workflowNodeViewDetailDTO
     * @return
     * @throws XbbException
     */
    WorkflowNodeViewDetailVO viewDetail(WorkflowNodeViewDetailDTO workflowNodeViewDetailDTO) throws XbbException;

    /**
     * 复制某个条件节点下面的所有节点
     *
     * @param workflowNodeCopyDTO
     * @return
     */
    WorkflowNodeCopyVO copyAllNode(WorkflowNodeCopyDTO workflowNodeCopyDTO) throws XbbException;
}
